package org.apache.dolphinscheduler.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.dolphinscheduler.dao.entity.MemoryAddress;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MemoryAddressMapper extends BaseMapper<MemoryAddress> {
    void updateNextTag(@Param("tag") String tag, @Param("nextTag") String nextTag);

    void updateModelTag(@Param("modelTag") int modelTag, @Param("nodeId") int nodeId);

    void updateNextTagById(@Param("id") int id, @Param("nextTag") String nextTag);

    List<MemoryAddress> getListByTag(@Param("tag") String tag);

    List<MemoryAddress> getOutPathByNodeId(@Param("nodeId") int nodeId);

    List<MemoryAddress> getOutPath(@Param("nodeId") int nodeId);

    List<MemoryAddress> getNodeIdByNextNodeId(@Param("nodeId") int nodeId);

    List<MemoryAddress> getListByProcessId(int processId);

    List<MemoryAddress> getListByTaskInstanceId(@Param("taskInstanceId")int taskInstanceId);

    void deleteByProcessId(int processId);

    List<MemoryAddress> getListByProcessDefinitionId(int processDefinitionId);

    void deleteByProcessDefinitionId(int processDefinitionId);

    void updateInputParamById(@Param("id") int id, @Param("inputParam") String inputParam);

    void deleteByNodeId(@Param("nodeId") int nodeId);

    void deleteByNodeIdAndNextNodeId(@Param("nodeId") int nodeId, @Param("nextNodeId") int nextNodeId);
}
